package com.asiainfo.eom.entity.unit_condition;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 推广单元限制维度: 通过地域限制
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("ad_unit_district") // 数据库表 地域限制
public class AdUnitDistrict {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("unit_id") // 关联的推广单元id
    private Long unitId;

    @TableField("province") // 省
    private String province;

    @TableField("city") // 市
    private String city;

    /**
     * 省略部分不重要信息的构造函数
     */
    public AdUnitDistrict(Long unitId, String province, String city) {
        this.unitId = unitId;
        this.province = province;
        this.city = city;
    }
}
